<template>
	<view class="u-padding-20">
		<u-empty :show="showEmpty" text="暂无数据" mode="list">
		</u-empty>
		<view class="u-margin-top-20 list_con" v-for="(item,index) in list" :key="index">
			<view style="width:100%;">
				<u-swiper height="200rpx" mode="number" :list="item.images" @click="openImagePig(index,item.images[0])"></u-swiper>
			</view>
			<!-- <image class="va_m" mode="aspectFill" :src="item.images" @click="openImagePig(index,item.images[0])" /> -->
			<!-- 此层wrap在此为必写的，否则可能会出现标题定位错误 -->
			<view class="u-rela u-margin-top-20 " >
				<text class="title u-line-2">{{ item.content }}</text>
				<view class="u-font-12 u-margin-top-20" style="color:#666;">
					<text class="u-margin-right-10">反馈者：{{item.username}}</text>
					<text>联系方式：{{item.tel}}</text>
					
				</view>
				<text class="dis_blo u-margin-top-10 time_con">{{item.time}}</text>
				<u-icon class="u-abso pos_right tel_btn" style="margin-left:50rpx;" color="#008b00" name="phone-fill" size="50" @click="makephone(ite.phone)"></u-icon>
			</view>
			
		</view>
	</view>
</template>

<script>
	import {
		getReport
	} from "@/service/indexService.js";
	export default {
		data() {
			return {
				showEmpty:false,
				list: [],
				imgurl:'',
				disabled: false,
				btnWidth: 180,
				show: false,
				// options: [
				// 	{
				// 		text: '删除',
				// 		style: {
				// 			backgroundColor: '#dd524d'
				// 		}
				// 	}
				// ]
			};
		},
		onLoad() {
			getReport().then(this.getReport);
		},
		methods: {
			getReport:function(e){
				if (e.code == 200) {
					this.list = e.result;
					this.showEmpty = false;
				} else {
					this.showEmpty = true;
					this.list = [];
				}
			},
			makephone(tel){
				uni.makePhoneCall({
					phoneNumber:tel
				})
			},
			openImagePig(index,images) {
				//调用预览图片的方法
				var imgs=[images]
				uni.previewImage({
					urls:imgs,
					current:index,
					complete(e) {
						console.log(e)
					}
				})
			},
		}
	};
</script>

<style lang="scss">
	.u-empty.data-v-3d842a77 {
		margin-top:120rpx !important;
	}
	page{
		background-color: #F3f5f7;
	}
	.list_con{
		background-color: #fff;
		padding:20rpx;
	}
	
	.title {
		text-align: left;
		font-size: 28rpx;
		color: #333;
		margin-top: 0rpx;
	}
	.time_con{
		font-size: 26rpx;
		color:#999;
	}
	.tel_btn{
		bottom:30rpx;
	}
</style>